package cn.edu.sdjzu.xg.eagle.xg23_kcsj_01.controller;

import cn.edu.sdjzu.xg.eagle.xg23_kcsj_01.entity.Standard;
import cn.edu.sdjzu.xg.eagle.xg23_kcsj_01.service.StandardService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class StandardController {
    @Autowired
    private StandardService standardService;
    //  保存标准
    @PostMapping("standard")
    public String save(@RequestBody Standard standard) {
        return standardService.save(standard);
    }
    //  删除标准

    @DeleteMapping("standard")
    public String delete(Long id) {
        return standardService.delete(id);
    }

}
